/* 公共样式文件 common.css */

/* 1. CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base font size and responsive rem system */
html {
  font-size: 16px; /* Base font size */
  scroll-behavior: smooth;
}

/* Responsive font sizes */
@media screen and (max-width: 1920px) {
  html {
    font-size: 16px;
  }
}

@media screen and (max-width: 1440px) {
  html {
    font-size: 15px;
  }
}

@media screen and (max-width: 1024px) {
  html {
    font-size: 14px;
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 13px;
  }
}

@media screen and (max-width: 480px) {
  html {
    font-size: 12px;
  }
}

body {
  font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  color: #232733;
  background: #fff;
  line-height: 1;
  font-size: 1rem;
  /* max-width: 120rem; */
  /* margin: 0 auto; */
  /* width: 100%; */
}

a {
  color: inherit;
  text-decoration: inherit;
}

img,
svg {
  display: inline-block;
}

ul,
li {
  padding: 0;
  margin: 0;
  list-style: none;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

a,
a:focus,
a:hover {
  text-decoration: none;
  cursor: pointer;
}

a:focus,
a:active,
div:focus {
  outline: none;
}

/* 2. 通用排版 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  font-weight: 700;
  /* color: #232733; */
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

/* 3. 通用按钮 */
.btn,
.blue-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  background: #0e78ff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0.125rem 0.5rem rgba(14, 120, 255, 0.08);
  letter-spacing: 0.09375rem;
}

.btn:hover,
.blue-btn:hover {
  background: #0e8fff;
}
.pre {
  white-space: pre-line; /* 或 pre */
}
/* 4. 通用颜色类 */
.text-primary {
  color: #0e78ff !important;
}
.text-dark {
  color: #232733 !important;
}
.text-gray {
  color: #b3c6e0 !important;
}
.text-light {
  color: #fff !important;
}
.bg-primary {
  background: #0e78ff !important;
}
.bg-dark {
  background: #232733 !important;
}
.bg-light {
  background: #fff !important;
}

/* 5. 通用间距工具类 */
.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 0.5rem !important;
}
.mt-2 {
  margin-top: 1rem !important;
}
.mt-3 {
  margin-top: 1.5rem !important;
}
.mt-4 {
  margin-top: 2rem !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.5rem !important;
}
.mb-2 {
  margin-bottom: 1rem !important;
}
.mb-3 {
  margin-bottom: 1.5rem !important;
}
.mb-4 {
  margin-bottom: 2rem !important;
}
.pt-1 {
  padding-top: 0.5rem !important;
}
.pt-2 {
  padding-top: 1rem !important;
}
.pt-3 {
  padding-top: 1.5rem !important;
}
.pt-4 {
  padding-top: 2rem !important;
}
.pb-1 {
  padding-bottom: 0.5rem !important;
}
.pb-2 {
  padding-bottom: 1rem !important;
}
.pb-3 {
  padding-bottom: 1.5rem !important;
}
.pb-4 {
  padding-bottom: 2rem !important;
}

/* 6. 通用对齐 */
.text-center {
  text-align: center !important;
}
.text-left {
  text-align: left !important;
}
.text-right {
  text-align: right !important;
}
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 7. 隐藏/显示 */
.d-none {
  display: none !important;
}
.d-block {
  display: block !important;
}
.d-flex {
  display: flex !important;
}

/* 8. 容器类 */
.container {
  width: 100%;
  max-width: 100rem; /* 1200px */
  margin: 0 auto;
}

.container-fluid {
  width: 100%;
}

/* 9. 响应式网格系统 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col {
  flex: 1;
  padding: 0 0.5rem;
}

/* 10. 响应式工具类 */
@media screen and (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media screen and (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
